package state

import org.apache.flink.streaming.api.scala.{DataStream, StreamExecutionEnvironment, _}

object State_Demo1 {


  /**
   *
   * @param args
   */
  def main(args: Array[String]): Unit = {


    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment

    val socketStream: DataStream[String] = env.socketTextStream("127.0.0.1", 8889)

    val dataStream: DataStream[Int] = socketStream.map(_.toInt)


    dataStream.print()





    env.execute()

  }


}
